package com.kunteng.ynhxksh.utils.rabbit;/**
 * Created by Administrator on 2018/9/26 0026.
 */

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author ydf
 * @com kt
 * @create 2018-09-26 上午 11:53
 **/
@Component
public class Consumer {

    @RabbitListener(queues = "cord")
    //@RabbitListener(queues = "cord", containerFactory="myFactory")
    public void processMessage(String msg) {
        System.out.println("------------------");
        System.out.format("Receiving Message1: -----[%s]----- \n.", msg);
    }

    @RabbitListener(queues = "cord")
    //@RabbitListener(queues = "cord", containerFactory="myFactory")
    public void processMessage2(String msg) {
        System.out.println("------------------");
        System.out.format("Receiving Message2: -----[%s]----- \n.", msg);
    }

}
